3.210 \(\int \frac {\sec (e+f x) (c+d \sec (e+f x))^4}{a+a \sec (e+f x)} \, dx\)

Optimal. Leaf size=183 \[ \frac {d \left (8 c^3-12 c^2 d+12 c d^2-3 d^3\right ) \tanh ^{-1}(\sin (e+f x))}{2 a f}-\frac {d \tan (e+f x) \left (d \left (6 c^2-20 c d+9 d^2\right ) \sec (e+f x)+4 \left (3 c^3-16 c^2 d+12 c d^2-4 d^3\right )\right )}{6 a f}+\frac {(c-d) \tan (e+f x) (c+d \sec (e+f x))^3}{f (a \sec (e+f x)+a)}-\frac {d (3 c-4 d) \tan (e+f x) (c+d \sec (e+f x))^2}{3 a f} \]

[Out]

1/2*d*(8*c^3-12*c^2*d+12*c*d^2-3*d^3)*arctanh(sin(f*x+e))/a/f-1/3*(3*c-4*d)*d*(c+d*sec(f*x+e))^2*tan(f*x+e)/a/
f+(c-d)*(c+d*sec(f*x+e))^3*tan(f*x+e)/f/(a+a*sec(f*x+e))-1/6*d*(12*c^3-64*c^2*d+48*c*d^2-16*d^3+d*(6*c^2-20*c*
d+9*d^2)*sec(f*x+e))*tan(f*x+e)/a/f

________________________________________________________________________________________

Rubi [A]  time = 0.34, antiderivative size = 236, normalized size of antiderivative = 1.29, number of steps used = 7, number of rules used = 7, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.226, Rules used = {3987, 98, 153, 147, 63, 217, 203} \[ \frac {d \left (-12 c^2 d+8 c^3+12 c d^2-3 d^3\right ) \tan (e+f x) \tan ^{-1}\left (\frac {\sqrt {a-a \sec (e+f x)}}{\sqrt {a (\sec (e+f x)+1)}}\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a \sec (e+f x)+a}}-\frac {d \tan (e+f x) \left (d \left (6 c^2-20 c d+9 d^2\right ) \sec (e+f x)+4 \left (-16 c^2 d+3 c^3+12 c d^2-4 d^3\right )\right )}{6 a f}+\frac {(c-d) \tan (e+f x) (c+d \sec (e+f x))^3}{f (a \sec (e+f x)+a)}-\frac {d (3 c-4 d) \tan (e+f x) (c+d \sec (e+f x))^2}{3 a f} \]

Antiderivative was successfully verified.

[In]

Int[(Sec[e + f*x]*(c + d*Sec[e + f*x])^4)/(a + a*Sec[e + f*x]),x]

[Out]

(d*(8*c^3 - 12*c^2*d + 12*c*d^2 - 3*d^3)*ArcTan[Sqrt[a - a*Sec[e + f*x]]/Sqrt[a*(1 + Sec[e + f*x])]]*Tan[e + f
*x])/(f*Sqrt[a - a*Sec[e + f*x]]*Sqrt[a + a*Sec[e + f*x]]) - ((3*c - 4*d)*d*(c + d*Sec[e + f*x])^2*Tan[e + f*x
])/(3*a*f) + ((c - d)*(c + d*Sec[e + f*x])^3*Tan[e + f*x])/(f*(a + a*Sec[e + f*x])) - (d*(4*(3*c^3 - 16*c^2*d
+ 12*c*d^2 - 4*d^3) + d*(6*c^2 - 20*c*d + 9*d^2)*Sec[e + f*x])*Tan[e + f*x])/(6*a*f)

Rule 63

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - (a*d)/b + (d*x^p)/b)^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 98

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Simp[((b*c -
 a*d)*(a + b*x)^(m + 1)*(c + d*x)^(n - 1)*(e + f*x)^(p + 1))/(b*(b*e - a*f)*(m + 1)), x] + Dist[1/(b*(b*e - a*
f)*(m + 1)), Int[(a + b*x)^(m + 1)*(c + d*x)^(n - 2)*(e + f*x)^p*Simp[a*d*(d*e*(n - 1) + c*f*(p + 1)) + b*c*(d
*e*(m - n + 2) - c*f*(m + p + 2)) + d*(a*d*f*(n + p) + b*(d*e*(m + 1) - c*f*(m + n + p + 1)))*x, x], x], x] /;
 FreeQ[{a, b, c, d, e, f, p}, x] && LtQ[m, -1] && GtQ[n, 1] && (IntegersQ[2*m, 2*n, 2*p] || IntegersQ[m, n + p
] || IntegersQ[p, m + n])

Rule 147

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.)*((e_) + (f_.)*(x_))*((g_.) + (h_.)*(x_)), x_Symbol]
:> -Simp[((a*d*f*h*(n + 2) + b*c*f*h*(m + 2) - b*d*(f*g + e*h)*(m + n + 3) - b*d*f*h*(m + n + 2)*x)*(a + b*x)^
(m + 1)*(c + d*x)^(n + 1))/(b^2*d^2*(m + n + 2)*(m + n + 3)), x] + Dist[(a^2*d^2*f*h*(n + 1)*(n + 2) + a*b*d*(
n + 1)*(2*c*f*h*(m + 1) - d*(f*g + e*h)*(m + n + 3)) + b^2*(c^2*f*h*(m + 1)*(m + 2) - c*d*(f*g + e*h)*(m + 1)*
(m + n + 3) + d^2*e*g*(m + n + 2)*(m + n + 3)))/(b^2*d^2*(m + n + 2)*(m + n + 3)), Int[(a + b*x)^m*(c + d*x)^n
, x], x] /; FreeQ[{a, b, c, d, e, f, g, h, m, n}, x] && NeQ[m + n + 2, 0] && NeQ[m + n + 3, 0]

Rule 153

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_))^(p_)*((g_.) + (h_.)*(x_)), x_Symb
ol] :> Simp[(h*(a + b*x)^m*(c + d*x)^(n + 1)*(e + f*x)^(p + 1))/(d*f*(m + n + p + 2)), x] + Dist[1/(d*f*(m + n
 + p + 2)), Int[(a + b*x)^(m - 1)*(c + d*x)^n*(e + f*x)^p*Simp[a*d*f*g*(m + n + p + 2) - h*(b*c*e*m + a*(d*e*(
n + 1) + c*f*(p + 1))) + (b*d*f*g*(m + n + p + 2) + h*(a*d*f*m - b*(d*e*(m + n + 1) + c*f*(m + p + 1))))*x, x]
, x], x] /; FreeQ[{a, b, c, d, e, f, g, h, n, p}, x] && GtQ[m, 0] && NeQ[m + n + p + 2, 0] && IntegerQ[m]

Rule 203

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTan[(Rt[b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 217

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a,
b}, x] &&  !GtQ[a, 0]

Rule 3987

Int[(csc[(e_.) + (f_.)*(x_)]*(g_.))^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]
*(d_.) + (c_))^(n_), x_Symbol] :> Dist[(a^2*g*Cot[e + f*x])/(f*Sqrt[a + b*Csc[e + f*x]]*Sqrt[a - b*Csc[e + f*x
]]), Subst[Int[((g*x)^(p - 1)*(a + b*x)^(m - 1/2)*(c + d*x)^n)/Sqrt[a - b*x], x], x, Csc[e + f*x]], x] /; Free
Q[{a, b, c, d, e, f, g, m, n, p}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && (EqQ[p,
 1] || IntegerQ[m - 1/2])

Rubi steps

\begin {align*} \int \frac {\sec (e+f x) (c+d \sec (e+f x))^4}{a+a \sec (e+f x)} \, dx &=-\frac {\left (a^2 \tan (e+f x)\right ) \operatorname {Subst}\left (\int \frac {(c+d x)^4}{\sqrt {a-a x} (a+a x)^{3/2}} \, dx,x,\sec (e+f x)\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}}\\ &=\frac {(c-d) (c+d \sec (e+f x))^3 \tan (e+f x)}{f (a+a \sec (e+f x))}+\frac {\tan (e+f x) \operatorname {Subst}\left (\int \frac {(c+d x)^2 \left (-a^2 (4 c-3 d) d+a^2 (3 c-4 d) d x\right )}{\sqrt {a-a x} \sqrt {a+a x}} \, dx,x,\sec (e+f x)\right )}{a f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}}\\ &=-\frac {(3 c-4 d) d (c+d \sec (e+f x))^2 \tan (e+f x)}{3 a f}+\frac {(c-d) (c+d \sec (e+f x))^3 \tan (e+f x)}{f (a+a \sec (e+f x))}-\frac {\tan (e+f x) \operatorname {Subst}\left (\int \frac {(c+d x) \left (a^4 d \left (12 c^2-15 c d+8 d^2\right )-a^4 d \left (6 c^2-20 c d+9 d^2\right ) x\right )}{\sqrt {a-a x} \sqrt {a+a x}} \, dx,x,\sec (e+f x)\right )}{3 a^3 f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}}\\ &=-\frac {(3 c-4 d) d (c+d \sec (e+f x))^2 \tan (e+f x)}{3 a f}+\frac {(c-d) (c+d \sec (e+f x))^3 \tan (e+f x)}{f (a+a \sec (e+f x))}-\frac {d \left (4 \left (3 c^3-16 c^2 d+12 c d^2-4 d^3\right )+d \left (6 c^2-20 c d+9 d^2\right ) \sec (e+f x)\right ) \tan (e+f x)}{6 a f}-\frac {\left (a d \left (8 c^3-12 c^2 d+12 c d^2-3 d^3\right ) \tan (e+f x)\right ) \operatorname {Subst}\left (\int \frac {1}{\sqrt {a-a x} \sqrt {a+a x}} \, dx,x,\sec (e+f x)\right )}{2 f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}}\\ &=-\frac {(3 c-4 d) d (c+d \sec (e+f x))^2 \tan (e+f x)}{3 a f}+\frac {(c-d) (c+d \sec (e+f x))^3 \tan (e+f x)}{f (a+a \sec (e+f x))}-\frac {d \left (4 \left (3 c^3-16 c^2 d+12 c d^2-4 d^3\right )+d \left (6 c^2-20 c d+9 d^2\right ) \sec (e+f x)\right ) \tan (e+f x)}{6 a f}+\frac {\left (d \left (8 c^3-12 c^2 d+12 c d^2-3 d^3\right ) \tan (e+f x)\right ) \operatorname {Subst}\left (\int \frac {1}{\sqrt {2 a-x^2}} \, dx,x,\sqrt {a-a \sec (e+f x)}\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}}\\ &=-\frac {(3 c-4 d) d (c+d \sec (e+f x))^2 \tan (e+f x)}{3 a f}+\frac {(c-d) (c+d \sec (e+f x))^3 \tan (e+f x)}{f (a+a \sec (e+f x))}-\frac {d \left (4 \left (3 c^3-16 c^2 d+12 c d^2-4 d^3\right )+d \left (6 c^2-20 c d+9 d^2\right ) \sec (e+f x)\right ) \tan (e+f x)}{6 a f}+\frac {\left (d \left (8 c^3-12 c^2 d+12 c d^2-3 d^3\right ) \tan (e+f x)\right ) \operatorname {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\frac {\sqrt {a-a \sec (e+f x)}}{\sqrt {a+a \sec (e+f x)}}\right )}{f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}}\\ &=\frac {d \left (8 c^3-12 c^2 d+12 c d^2-3 d^3\right ) \tan ^{-1}\left (\frac {\sqrt {a-a \sec (e+f x)}}{\sqrt {a+a \sec (e+f x)}}\right ) \tan (e+f x)}{f \sqrt {a-a \sec (e+f x)} \sqrt {a+a \sec (e+f x)}}-\frac {(3 c-4 d) d (c+d \sec (e+f x))^2 \tan (e+f x)}{3 a f}+\frac {(c-d) (c+d \sec (e+f x))^3 \tan (e+f x)}{f (a+a \sec (e+f x))}-\frac {d \left (4 \left (3 c^3-16 c^2 d+12 c d^2-4 d^3\right )+d \left (6 c^2-20 c d+9 d^2\right ) \sec (e+f x)\right ) \tan (e+f x)}{6 a f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [B]  time = 6.46, size = 1243, normalized size = 6.79 \[ \text {result too large to display} \]

Antiderivative was successfully verified.

[In]

Integrate[(Sec[e + f*x]*(c + d*Sec[e + f*x])^4)/(a + a*Sec[e + f*x]),x]

[Out]

((-8*c^3*d + 12*c^2*d^2 - 12*c*d^3 + 3*d^4)*Cos[e/2 + (f*x)/2]^2*Cos[e + f*x]^3*Log[Cos[e/2 + (f*x)/2] - Sin[e
/2 + (f*x)/2]]*(c + d*Sec[e + f*x])^4)/(f*(d + c*Cos[e + f*x])^4*(a + a*Sec[e + f*x])) + ((8*c^3*d - 12*c^2*d^
2 + 12*c*d^3 - 3*d^4)*Cos[e/2 + (f*x)/2]^2*Cos[e + f*x]^3*Log[Cos[e/2 + (f*x)/2] + Sin[e/2 + (f*x)/2]]*(c + d*
Sec[e + f*x])^4)/(f*(d + c*Cos[e + f*x])^4*(a + a*Sec[e + f*x])) + (Cos[e/2 + (f*x)/2]*Sec[e/2]*Sec[e]*(c + d*
Sec[e + f*x])^4*(-18*c^4*Sin[(f*x)/2] + 72*c^3*d*Sin[(f*x)/2] - 36*c^2*d^2*Sin[(f*x)/2] + 24*c*d^3*Sin[(f*x)/2
] + 6*d^4*Sin[(f*x)/2] + 18*c^4*Sin[(3*f*x)/2] - 72*c^3*d*Sin[(3*f*x)/2] + 180*c^2*d^2*Sin[(3*f*x)/2] - 108*c*
d^3*Sin[(3*f*x)/2] + 39*d^4*Sin[(3*f*x)/2] - 72*c^2*d^2*Sin[e - (f*x)/2] + 48*c*d^3*Sin[e - (f*x)/2] - 24*d^4*
Sin[e - (f*x)/2] - 36*c^2*d^2*Sin[e + (f*x)/2] + 24*c*d^3*Sin[e + (f*x)/2] - 6*d^4*Sin[e + (f*x)/2] - 18*c^4*S
in[2*e + (f*x)/2] + 72*c^3*d*Sin[2*e + (f*x)/2] - 144*c^2*d^2*Sin[2*e + (f*x)/2] + 96*c*d^3*Sin[2*e + (f*x)/2]
 - 24*d^4*Sin[2*e + (f*x)/2] + 72*c^2*d^2*Sin[e + (3*f*x)/2] - 36*c*d^3*Sin[e + (3*f*x)/2] + 21*d^4*Sin[e + (3
*f*x)/2] + 18*c^4*Sin[2*e + (3*f*x)/2] - 72*c^3*d*Sin[2*e + (3*f*x)/2] + 72*c^2*d^2*Sin[2*e + (3*f*x)/2] - 36*
c*d^3*Sin[2*e + (3*f*x)/2] + 9*d^4*Sin[2*e + (3*f*x)/2] - 36*c^2*d^2*Sin[3*e + (3*f*x)/2] + 36*c*d^3*Sin[3*e +
 (3*f*x)/2] - 9*d^4*Sin[3*e + (3*f*x)/2] + 36*c^2*d^2*Sin[e + (5*f*x)/2] - 12*c*d^3*Sin[e + (5*f*x)/2] + 7*d^4
*Sin[e + (5*f*x)/2] - 6*c^4*Sin[2*e + (5*f*x)/2] + 24*c^3*d*Sin[2*e + (5*f*x)/2] + 12*c*d^3*Sin[2*e + (5*f*x)/
2] + d^4*Sin[2*e + (5*f*x)/2] + 12*c*d^3*Sin[3*e + (5*f*x)/2] - 3*d^4*Sin[3*e + (5*f*x)/2] - 6*c^4*Sin[4*e + (
5*f*x)/2] + 24*c^3*d*Sin[4*e + (5*f*x)/2] - 36*c^2*d^2*Sin[4*e + (5*f*x)/2] + 36*c*d^3*Sin[4*e + (5*f*x)/2] -
9*d^4*Sin[4*e + (5*f*x)/2] + 6*c^4*Sin[2*e + (7*f*x)/2] - 24*c^3*d*Sin[2*e + (7*f*x)/2] + 72*c^2*d^2*Sin[2*e +
 (7*f*x)/2] - 48*c*d^3*Sin[2*e + (7*f*x)/2] + 16*d^4*Sin[2*e + (7*f*x)/2] + 36*c^2*d^2*Sin[3*e + (7*f*x)/2] -
24*c*d^3*Sin[3*e + (7*f*x)/2] + 10*d^4*Sin[3*e + (7*f*x)/2] + 6*c^4*Sin[4*e + (7*f*x)/2] - 24*c^3*d*Sin[4*e +
(7*f*x)/2] + 36*c^2*d^2*Sin[4*e + (7*f*x)/2] - 24*c*d^3*Sin[4*e + (7*f*x)/2] + 6*d^4*Sin[4*e + (7*f*x)/2]))/(4
8*f*(d + c*Cos[e + f*x])^4*(a + a*Sec[e + f*x]))

________________________________________________________________________________________

fricas [A]  time = 0.48, size = 297, normalized size = 1.62 \[ \frac {3 \, {\left ({\left (8 \, c^{3} d - 12 \, c^{2} d^{2} + 12 \, c d^{3} - 3 \, d^{4}\right )} \cos \left (f x + e\right )^{4} + {\left (8 \, c^{3} d - 12 \, c^{2} d^{2} + 12 \, c d^{3} - 3 \, d^{4}\right )} \cos \left (f x + e\right )^{3}\right )} \log \left (\sin \left (f x + e\right ) + 1\right ) - 3 \, {\left ({\left (8 \, c^{3} d - 12 \, c^{2} d^{2} + 12 \, c d^{3} - 3 \, d^{4}\right )} \cos \left (f x + e\right )^{4} + {\left (8 \, c^{3} d - 12 \, c^{2} d^{2} + 12 \, c d^{3} - 3 \, d^{4}\right )} \cos \left (f x + e\right )^{3}\right )} \log \left (-\sin \left (f x + e\right ) + 1\right ) + 2 \, {\left (2 \, d^{4} + 2 \, {\left (3 \, c^{4} - 12 \, c^{3} d + 36 \, c^{2} d^{2} - 24 \, c d^{3} + 8 \, d^{4}\right )} \cos \left (f x + e\right )^{3} + {\left (36 \, c^{2} d^{2} - 12 \, c d^{3} + 7 \, d^{4}\right )} \cos \left (f x + e\right )^{2} + {\left (12 \, c d^{3} - d^{4}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{12 \, {\left (a f \cos \left (f x + e\right )^{4} + a f \cos \left (f x + e\right )^{3}\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)*(c+d*sec(f*x+e))^4/(a+a*sec(f*x+e)),x, algorithm="fricas")

[Out]

1/12*(3*((8*c^3*d - 12*c^2*d^2 + 12*c*d^3 - 3*d^4)*cos(f*x + e)^4 + (8*c^3*d - 12*c^2*d^2 + 12*c*d^3 - 3*d^4)*
cos(f*x + e)^3)*log(sin(f*x + e) + 1) - 3*((8*c^3*d - 12*c^2*d^2 + 12*c*d^3 - 3*d^4)*cos(f*x + e)^4 + (8*c^3*d
 - 12*c^2*d^2 + 12*c*d^3 - 3*d^4)*cos(f*x + e)^3)*log(-sin(f*x + e) + 1) + 2*(2*d^4 + 2*(3*c^4 - 12*c^3*d + 36
*c^2*d^2 - 24*c*d^3 + 8*d^4)*cos(f*x + e)^3 + (36*c^2*d^2 - 12*c*d^3 + 7*d^4)*cos(f*x + e)^2 + (12*c*d^3 - d^4
)*cos(f*x + e))*sin(f*x + e))/(a*f*cos(f*x + e)^4 + a*f*cos(f*x + e)^3)

________________________________________________________________________________________

giac [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: NotImplementedError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)*(c+d*sec(f*x+e))^4/(a+a*sec(f*x+e)),x, algorithm="giac")

[Out]

Exception raised: NotImplementedError >> Unable to parse Giac output: Unable to check sign: (4*pi/x/2)>(-4*pi/
x/2)Unable to check sign: (4*pi/x/2)>(-4*pi/x/2)2/f*((tan((f*x+exp(1))/2)*c^4-4*tan((f*x+exp(1))/2)*c^3*d+6*ta
n((f*x+exp(1))/2)*c^2*d^2-4*tan((f*x+exp(1))/2)*c*d^3+tan((f*x+exp(1))/2)*d^4)*1/2/a+(-36*tan((f*x+exp(1))/2)^
5*c^2*d^2+36*tan((f*x+exp(1))/2)^5*c*d^3-15*tan((f*x+exp(1))/2)^5*d^4+72*tan((f*x+exp(1))/2)^3*c^2*d^2-48*tan(
(f*x+exp(1))/2)^3*c*d^3+16*tan((f*x+exp(1))/2)^3*d^4-36*tan((f*x+exp(1))/2)*c^2*d^2+12*tan((f*x+exp(1))/2)*c*d
^3-9*tan((f*x+exp(1))/2)*d^4)*1/6/a/(tan((f*x+exp(1))/2)^2-1)^3-(8*c^3*d-12*c^2*d^2+12*c*d^3-3*d^4)*1/4/a*ln(a
bs(tan((f*x+exp(1))/2)-1))+(8*c^3*d-12*c^2*d^2+12*c*d^3-3*d^4)*1/4/a*ln(abs(tan((f*x+exp(1))/2)+1)))

________________________________________________________________________________________

maple [B]  time = 0.67, size = 596, normalized size = 3.26 \[ -\frac {d^{4}}{a f \left (\tan \left (\frac {e}{2}+\frac {f x}{2}\right )-1\right )^{2}}-\frac {d^{4}}{3 a f \left (\tan \left (\frac {e}{2}+\frac {f x}{2}\right )+1\right )^{3}}+\frac {\tan \left (\frac {e}{2}+\frac {f x}{2}\right ) d^{4}}{a f}-\frac {d^{4}}{3 a f \left (\tan \left (\frac {e}{2}+\frac {f x}{2}\right )-1\right )^{3}}-\frac {3 \ln \left (\tan \left (\frac {e}{2}+\frac {f x}{2}\right )+1\right ) d^{4}}{2 a f}-\frac {5 d^{4}}{2 a f \left (\tan \left (\frac {e}{2}+\frac {f x}{2}\right )+1\right )}+\frac {d^{4}}{a f \left (\tan \left (\frac {e}{2}+\frac {f x}{2}\right )+1\right )^{2}}+\frac {3 \ln \left (\tan \left (\frac {e}{2}+\frac {f x}{2}\right )-1\right ) d^{4}}{2 a f}-\frac {5 d^{4}}{2 a f \left (\tan \left (\frac {e}{2}+\frac {f x}{2}\right )-1\right )}+\frac {c^{4} \tan \left (\frac {e}{2}+\frac {f x}{2}\right )}{f a}+\frac {6 \ln \left (\tan \left (\frac {e}{2}+\frac {f x}{2}\right )+1\right ) c \,d^{3}}{a f}-\frac {2 d^{3} c}{a f \left (\tan \left (\frac {e}{2}+\frac {f x}{2}\right )+1\right )^{2}}+\frac {6 d^{3} c}{a f \left (\tan \left (\frac {e}{2}+\frac {f x}{2}\right )+1\right )}-\frac {4 \tan \left (\frac {e}{2}+\frac {f x}{2}\right ) c^{3} d}{a f}-\frac {4 \ln \left (\tan \left (\frac {e}{2}+\frac {f x}{2}\right )-1\right ) c^{3} d}{a f}+\frac {6 \ln \left (\tan \left (\frac {e}{2}+\frac {f x}{2}\right )-1\right ) c^{2} d^{2}}{a f}-\frac {6 \ln \left (\tan \left (\frac {e}{2}+\frac {f x}{2}\right )-1\right ) c \,d^{3}}{a f}-\frac {6 d^{2} c^{2}}{a f \left (\tan \left (\frac {e}{2}+\frac {f x}{2}\right )+1\right )}+\frac {4 \ln \left (\tan \left (\frac {e}{2}+\frac {f x}{2}\right )+1\right ) c^{3} d}{a f}-\frac {6 \ln \left (\tan \left (\frac {e}{2}+\frac {f x}{2}\right )+1\right ) c^{2} d^{2}}{a f}+\frac {6 \tan \left (\frac {e}{2}+\frac {f x}{2}\right ) c^{2} d^{2}}{a f}-\frac {4 \tan \left (\frac {e}{2}+\frac {f x}{2}\right ) c \,d^{3}}{a f}-\frac {6 d^{2} c^{2}}{a f \left (\tan \left (\frac {e}{2}+\frac {f x}{2}\right )-1\right )}+\frac {6 d^{3} c}{a f \left (\tan \left (\frac {e}{2}+\frac {f x}{2}\right )-1\right )}+\frac {2 d^{3} c}{a f \left (\tan \left (\frac {e}{2}+\frac {f x}{2}\right )-1\right )^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(f*x+e)*(c+d*sec(f*x+e))^4/(a+a*sec(f*x+e)),x)

[Out]

-1/a/f*d^4/(tan(1/2*e+1/2*f*x)-1)^2-1/3/a/f*d^4/(tan(1/2*e+1/2*f*x)+1)^3+1/a/f*tan(1/2*e+1/2*f*x)*d^4-1/3/a/f*
d^4/(tan(1/2*e+1/2*f*x)-1)^3-3/2/a/f*ln(tan(1/2*e+1/2*f*x)+1)*d^4-5/2/a/f*d^4/(tan(1/2*e+1/2*f*x)+1)+1/a/f*d^4
/(tan(1/2*e+1/2*f*x)+1)^2+3/2/a/f*ln(tan(1/2*e+1/2*f*x)-1)*d^4-5/2/a/f*d^4/(tan(1/2*e+1/2*f*x)-1)+1/f*c^4/a*ta
n(1/2*e+1/2*f*x)+6/a/f*ln(tan(1/2*e+1/2*f*x)+1)*c*d^3-2/a/f*d^3/(tan(1/2*e+1/2*f*x)+1)^2*c+6/a/f*d^3/(tan(1/2*
e+1/2*f*x)+1)*c-4/a/f*tan(1/2*e+1/2*f*x)*c^3*d-4/a/f*ln(tan(1/2*e+1/2*f*x)-1)*c^3*d+6/a/f*ln(tan(1/2*e+1/2*f*x
)-1)*c^2*d^2-6/a/f*ln(tan(1/2*e+1/2*f*x)-1)*c*d^3-6/a/f*d^2/(tan(1/2*e+1/2*f*x)+1)*c^2+4/a/f*ln(tan(1/2*e+1/2*
f*x)+1)*c^3*d-6/a/f*ln(tan(1/2*e+1/2*f*x)+1)*c^2*d^2+6/a/f*tan(1/2*e+1/2*f*x)*c^2*d^2-4/a/f*tan(1/2*e+1/2*f*x)
*c*d^3-6/a/f*d^2/(tan(1/2*e+1/2*f*x)-1)*c^2+6/a/f*d^3/(tan(1/2*e+1/2*f*x)-1)*c+2/a/f*d^3/(tan(1/2*e+1/2*f*x)-1
)^2*c

________________________________________________________________________________________

maxima [B]  time = 0.46, size = 596, normalized size = 3.26 \[ \frac {d^{4} {\left (\frac {2 \, {\left (\frac {9 \, \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - \frac {16 \, \sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}} + \frac {15 \, \sin \left (f x + e\right )^{5}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{5}}\right )}}{a - \frac {3 \, a \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac {3 \, a \sin \left (f x + e\right )^{4}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{4}} - \frac {a \sin \left (f x + e\right )^{6}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{6}}} - \frac {9 \, \log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + 1\right )}{a} + \frac {9 \, \log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - 1\right )}{a} + \frac {6 \, \sin \left (f x + e\right )}{a {\left (\cos \left (f x + e\right ) + 1\right )}}\right )} - 12 \, c d^{3} {\left (\frac {2 \, {\left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - \frac {3 \, \sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}}\right )}}{a - \frac {2 \, a \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac {a \sin \left (f x + e\right )^{4}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{4}}} - \frac {3 \, \log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + 1\right )}{a} + \frac {3 \, \log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - 1\right )}{a} + \frac {2 \, \sin \left (f x + e\right )}{a {\left (\cos \left (f x + e\right ) + 1\right )}}\right )} - 36 \, c^{2} d^{2} {\left (\frac {\log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + 1\right )}{a} - \frac {\log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - 1\right )}{a} - \frac {2 \, \sin \left (f x + e\right )}{{\left (a - \frac {a \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}}\right )} {\left (\cos \left (f x + e\right ) + 1\right )}} - \frac {\sin \left (f x + e\right )}{a {\left (\cos \left (f x + e\right ) + 1\right )}}\right )} + 24 \, c^{3} d {\left (\frac {\log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + 1\right )}{a} - \frac {\log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - 1\right )}{a} - \frac {\sin \left (f x + e\right )}{a {\left (\cos \left (f x + e\right ) + 1\right )}}\right )} + \frac {6 \, c^{4} \sin \left (f x + e\right )}{a {\left (\cos \left (f x + e\right ) + 1\right )}}}{6 \, f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)*(c+d*sec(f*x+e))^4/(a+a*sec(f*x+e)),x, algorithm="maxima")

[Out]

1/6*(d^4*(2*(9*sin(f*x + e)/(cos(f*x + e) + 1) - 16*sin(f*x + e)^3/(cos(f*x + e) + 1)^3 + 15*sin(f*x + e)^5/(c
os(f*x + e) + 1)^5)/(a - 3*a*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 3*a*sin(f*x + e)^4/(cos(f*x + e) + 1)^4 - a
*sin(f*x + e)^6/(cos(f*x + e) + 1)^6) - 9*log(sin(f*x + e)/(cos(f*x + e) + 1) + 1)/a + 9*log(sin(f*x + e)/(cos
(f*x + e) + 1) - 1)/a + 6*sin(f*x + e)/(a*(cos(f*x + e) + 1))) - 12*c*d^3*(2*(sin(f*x + e)/(cos(f*x + e) + 1)
- 3*sin(f*x + e)^3/(cos(f*x + e) + 1)^3)/(a - 2*a*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + a*sin(f*x + e)^4/(cos(
f*x + e) + 1)^4) - 3*log(sin(f*x + e)/(cos(f*x + e) + 1) + 1)/a + 3*log(sin(f*x + e)/(cos(f*x + e) + 1) - 1)/a
 + 2*sin(f*x + e)/(a*(cos(f*x + e) + 1))) - 36*c^2*d^2*(log(sin(f*x + e)/(cos(f*x + e) + 1) + 1)/a - log(sin(f
*x + e)/(cos(f*x + e) + 1) - 1)/a - 2*sin(f*x + e)/((a - a*sin(f*x + e)^2/(cos(f*x + e) + 1)^2)*(cos(f*x + e)
+ 1)) - sin(f*x + e)/(a*(cos(f*x + e) + 1))) + 24*c^3*d*(log(sin(f*x + e)/(cos(f*x + e) + 1) + 1)/a - log(sin(
f*x + e)/(cos(f*x + e) + 1) - 1)/a - sin(f*x + e)/(a*(cos(f*x + e) + 1))) + 6*c^4*sin(f*x + e)/(a*(cos(f*x + e
) + 1)))/f

________________________________________________________________________________________

mupad [B]  time = 2.45, size = 211, normalized size = 1.15 \[ \frac {\left (12\,c^2\,d^2-12\,c\,d^3+5\,d^4\right )\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^5+\left (-24\,c^2\,d^2+16\,c\,d^3-\frac {16\,d^4}{3}\right )\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3+\left (12\,c^2\,d^2-4\,c\,d^3+3\,d^4\right )\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}{f\,\left (-a\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6+3\,a\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4-3\,a\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+a\right )}+\frac {\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,{\left (c-d\right )}^4}{a\,f}+\frac {d\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\right )\,\left (8\,c^3-12\,c^2\,d+12\,c\,d^2-3\,d^3\right )}{a\,f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c + d/cos(e + f*x))^4/(cos(e + f*x)*(a + a/cos(e + f*x))),x)

[Out]

(tan(e/2 + (f*x)/2)*(3*d^4 - 4*c*d^3 + 12*c^2*d^2) + tan(e/2 + (f*x)/2)^5*(5*d^4 - 12*c*d^3 + 12*c^2*d^2) - ta
n(e/2 + (f*x)/2)^3*((16*d^4)/3 - 16*c*d^3 + 24*c^2*d^2))/(f*(a - 3*a*tan(e/2 + (f*x)/2)^2 + 3*a*tan(e/2 + (f*x
)/2)^4 - a*tan(e/2 + (f*x)/2)^6)) + (tan(e/2 + (f*x)/2)*(c - d)^4)/(a*f) + (d*atanh(tan(e/2 + (f*x)/2))*(12*c*
d^2 - 12*c^2*d + 8*c^3 - 3*d^3))/(a*f)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \frac {\int \frac {c^{4} \sec {\left (e + f x \right )}}{\sec {\left (e + f x \right )} + 1}\, dx + \int \frac {d^{4} \sec ^{5}{\left (e + f x \right )}}{\sec {\left (e + f x \right )} + 1}\, dx + \int \frac {4 c d^{3} \sec ^{4}{\left (e + f x \right )}}{\sec {\left (e + f x \right )} + 1}\, dx + \int \frac {6 c^{2} d^{2} \sec ^{3}{\left (e + f x \right )}}{\sec {\left (e + f x \right )} + 1}\, dx + \int \frac {4 c^{3} d \sec ^{2}{\left (e + f x \right )}}{\sec {\left (e + f x \right )} + 1}\, dx}{a} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)*(c+d*sec(f*x+e))**4/(a+a*sec(f*x+e)),x)

[Out]

(Integral(c**4*sec(e + f*x)/(sec(e + f*x) + 1), x) + Integral(d**4*sec(e + f*x)**5/(sec(e + f*x) + 1), x) + In
tegral(4*c*d**3*sec(e + f*x)**4/(sec(e + f*x) + 1), x) + Integral(6*c**2*d**2*sec(e + f*x)**3/(sec(e + f*x) +
1), x) + Integral(4*c**3*d*sec(e + f*x)**2/(sec(e + f*x) + 1), x))/a

________________________________________________________________________________________